import request from './request.js'

export default {
	detail(sn) {
		return request.post('order/detail', { sn });
	},
	cities(company, cityType) {
		return request.post('order/cities', { company, cityType });
	},
	shops(company, city, date, goods) {
		return request.post('order/shops', { company, city, date, goods })
	},
	shop(id, goods, date) {
		return request.post('order/shop', { id, goods, date })
	},
	add(data) {
		return request.post('order/add', data)
	},
	verify(data) {
		return request.post('order/verify', data)
	},
	getGoods(company) {
		return request.post('order/goodsList', { company })
	},
	createOrder(data) {
		return request.post('order/createOrder',  data)
	},
	getOrders(userId) {
		return request.post('order/get_orders', { userId })
	},
	getUser(uid) {
		return request.post('order/get_user?userId=' + uid)
	}
}